import { check, validationResult } from "express-validator";

const login = [
  check("account")
    .notEmpty()
    .withMessage("不能为空")
    .isString()
    .withMessage("类型为字符串")
    .trim()
    .escape(),
  check("password")
    .notEmpty()
    .withMessage("不能为空")
    .isString()
    .withMessage("类型为字符串")
    .trim()
    .escape(),
];

export const validate = {
  login,
};
